home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Utilities / Lengths / length-syncopate < prev    next >
Lisp/Scheme  |  1998-10-23  |  661b  |  11 lines

  1. length-syncopate seed ratio-m ratio-n length-pattern
  2.  
  3. This function enables you to create syncopations on a note-length pattern by applying minus values to a proportion of a pattern's lengths using a controlled random operation.
  4.  
  5. (setq rhy '(1/4 1/16 1/8 1/16 1/2 1/8 1/8 1/8 1/8))
  6.  
  7. (setq rhyv (length-syncopate 0.14 3 1 rhy))
  8. --> (1/4 -1/16 -1/8 1/16 -1/2 1/8 1/8 1/8 1/8)
  9.  
  10. The random application of minus values produces rest lengths. The quantity and distribution of these rest lengths are controlled by ratio-m and ratio-n settings. In the example above the ratio is set to control the random operation to have a distribution of 3 lengths to 1 rest length.
  11.